package com.szt.school.rabbitmq.simple;

import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

@Component
public class Consumer {
    @RabbitHandler
    @RabbitListener(queues = "my_simple_queue")
    public void process(String msg){
        System.out.println("消费者接收：" + msg);
    }

}
